<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('登录信息增删改查列表')" />
    <style>
        td, th { white-space: nowrap; }
    </style>
</head>
<body class="gray-bg">
     <div class="container-div">
         <input type="hidden" style="width: 0; height: 0;" id="register" th:value="${type}">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>识别号：</p>
                                <input type="text" name="sbh"/>
                            </li>
                            <li>
                                <p style="width: 100px;">纳税人名称：</p>
                                <input type="text" name="nsrmc"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="register:register:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bus:register:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="bus:register:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('register:register:edit')}]];
        var removeFlag = [[${@permission.hasPermi('register:register:remove')}]];
        var prefix = ctx + "register/register";
        var registerType = $("#register").val() ? $("#register").val() : "register";

        $(function() {
            var options = {
                url: prefix + "/list/" + registerType,
                createUrl: prefix + "/add/" + registerType,
                updateUrl: prefix + "/edit/"+registerType+"/{id}",
                removeUrl: prefix + "/remove/" + registerType,
                exportUrl: prefix + "/export/" + registerType,
                importUrl: prefix + "/importData/" + registerType,
                importTemplateUrl: prefix + "/importTemplate",
                modalName: "登记信息",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'id', 
                    title : '主键',
                    visible: false
                },
                {
                    field : 'sbh', 
                    title : '识别号'
                },
                {
                    field : 'nsrmc', 
                    title : '纳税人名称'
                },
                {
                    field : 'nsrzt', 
                    title : '纳税人状态'
                },
                {
                    field : 'kzztdjlx', 
                    title : '课征主体等级类型'
                },
                {
                    field : 'djzclx', 
                    title : '登记注册类型'
                },
                {
                    field : 'zzjgdm', 
                    title : '组织机构代码'
                },
                {
                    field : 'djrq', 
                    title : '登记日期'
                },
                {
                    field : 'hy', 
                    title : '行业'
                },
                {
                    field : 'ssjdbsc', 
                    title : '所属街道办事处'
                },
                {
                    field : 'zgsws', 
                    title : '主管税务所'
                },
                {
                    field : 'ssgly', 
                    title : '税收管理员'
                },
                {
                    field : 'zcdz', 
                    title : '注册地址'
                },
                {
                    field : 'scjydz', 
                    title : '生产经营地址'
                },
                {
                    field : 'frmc', 
                    title : '法人名称'
                },
                {
                    field : 'frdh', 
                    title : '法人电话'
                },
                {
                    field : 'frgddh', 
                    title : '法人固定电话'
                },
                {
                    field : 'frsfzh', 
                    title : '法人身份证号'
                },
                {
                    field : 'cwfzrxm', 
                    title : '财务负责人姓名'
                },
                {
                    field : 'cwfzrdh', 
                    title : '财务负责人电话'
                },
                {
                    field : 'bsrxm', 
                    title : '办税人姓名'
                },
                {
                    field : 'bsrdh', 
                    title : '办税人电话'
                },
                {
                    field : 'bsrsfzh', 
                    title : '办税人身份证号'
                },
                {
                    field : 'bsrgddh', 
                    title : '办税人固定电话'
                },
                {
                    field : 'cwfzrsfzh', 
                    title : '财务负责人身份证号'
                },
                {
                    field : 'cwfzrgddh', 
                    title : '财务负责人固定电话'
                },
                {
                    field : 'gdghlx', 
                    title : '国地管户类型'
                },
                {
                    field : 'dwlsgx', 
                    title : '单位隶属关系'
                },
                {
                    field : 'zgswjg', 
                    title : '主管税务机关'
                },
                {
                    field : 'ssdabh', 
                    title : '税收档案编号'
                },
                {
                    field : 'shxydm', 
                    title : '社会信用代码'
                },
                {
                    field : 'yxbz', 
                    title : '有效标志'
                },
                {
                    field : 'kqcwsztdjbz', 
                    title : '跨区财务税主体登记标志'
                },
                {
                    field : 'djhlb', 
                    title : '登记户类别'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
<!-- 导入区域 -->
<script id="importTpl" type="text/template">
    <form enctype="multipart/form-data" class="mt20 mb10">
        <div class="col-xs-offset-1">
            <input type="file" id="file" name="file"/>
            <div class="mt10 pt5">
                &nbsp;	<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
            </div>
            <font color="red" class="pull-left mt10">
                提示：仅允许导入“xls”或“xlsx”格式文件！
            </font>
        </div>
    </form>
</script>
</html>